A wall is a usually solid structure that defines and sometimes protects an area. Most commonly, a wall delineates a building, separates space in buildings into rooms , or protects or delineates a space in the open air . There are three principal types of structural walls: building walls, exterior boundary walls, and retaining walls.

Building walls have one main purpose: to support roofs and ceilings. Such walls most often have three or more separate components. In today's construction, a building's wall will usually have the structural elements, insulation, and finish elements, or surface. In addition, the wall may house various types of electrical wiring or plumbing . Electrical outlets are usually mounted in walls.
Boundary walls include privacy walls, boundary-marking walls on property, and town walls. These intergrade into fences; the conventional differentiation is that a fence is of minimal thickness and often is open in nature, while a wall is usually more than a nominal thickness and is completely closed, or opaque. More to the point, if an exterior structure is made of wood or wire, it is generally referred to as a fence , while if it is made of masonry , it is considered a wall.
Retaining walls are a special type of wall, that may be either external to a building or part of a building, that serves to provide a barrier to the movement of earth, stone or water. The ground surface or water on one side of a retaining wall will be noticeably higher than on the other side. A dike is one type of retaining wall.